<? include_once('conn.php');
$stock_detail = $db->select("SELECT * FROM `".tablepre."stock` where `sid` = '".$_GET[sid]."'");
include_once('include/func.php');
include_once("user_check.php") ; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>order view</title>

</head>

<body>
<form action=""  name="myform" method="POST" onSubmit="return myfun()">
<table width="850" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td  valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr >
    <td colspan="2"><img src="images/ttfjpg.php?t=<? echo PRODUCT_DETAIL;?>&bg=titlebg2.jpg&z=18&x=5&y=22&r=0&b=0&g=0"  /></td>
  </tr>
  <tr>
    <td align="right"><? echo PRODUCT_NAME;?>：</td>
    <td style="color:#000; font-size:16px;"><? echo $stock_detail[0][1]; ?></td>
  </tr>
  <tr>
    <td align="right"><? echo PRODUCT_MODEL;?>：</td>
    <td><? echo attachment($con0=1,$con1=$stock_detail[0][0],$con2='model');  ?></td>
  </tr>
  <tr>
    <td align="right" ><? echo MEMBER_DESCOUNT;?>：</td>
    <td style="color:#000; font-size:16px;"><? echo $leveltype[0][1].' ('.$leveltype[0][2].' '.MEMBER_DESCOUNT.')'; ?></td>
  </tr>
  <tr>
    <td align="right"><? echo PRODUCT_OTHER_LINK;?>：</td>
    <td><? echo attachment($con0=1,$con1=$stock_detail[0][0],$con2='url')<>null?'<a href="'.attachment($con0=1,$con1=$stock_detail[0][0],$con2='url').'" target="_blank">'.MEMBER_WEB.'</a>':'';  ?></td>
  </tr>
  <tr>
    <td colspan="2"><img src="images/ttfjpg.php?t=<? echo PRODUCT_CURRENT_STOCK; ?>&amp;bg=titlebg2.jpg&amp;z=18&amp;x=5&amp;y=22&amp;r=0&amp;b=0&amp;g=0"  /></td>
  </tr>
  <tr>
    <td colspan="2">	  <style>
          #c1 {border: #666 1px solid; margin:5px;}
		  #c2 {border: #CCC 3px solid; padding:5px;}
		  #cleft { float:left; margin:0 5px 0 0; background: #F4F4F4;}
		  #cright { float:left; color:#000; font-size:14px; }
		  #c2 ul { margin:0px; padding:0px;}
		  #c2 li { list-style-type:none; padding:0 5px 5px 0;}
		  #cclear{ clear:both; height:0px; overflow:hidden;}
		  #c2 tr{ border-bottom:#999 dotted 1px;}
          </style><div id="c1"><div id="c2">
          <table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><? echo PRODUCT_MATERIAL;?></td>
    <td><? echo PRODUCT_COLOR;?></td>
    <td><? echo PRODUCT_SIZE;?></td>
    <td><? echo PRODUCT_CURRENT_STOCK;?></td>
    <td><? echo PRODUCT_PRICE;?></td>
    <td><? echo PRODUCT_MODEL;?></td>
  </tr>


          <?
		$arr_list = $db->select("SELECT name,quality1,quality2,quality3,quantity,price,model,lastdate,unit FROM `".tablepre."stock_item` where sid = '".$stock_detail[0][0]."' and quantity > 0 and sale = '1' ");
		for($i=0;$i<count($arr_list);$i++) { ?>

<tr>
        <td><? echo $arr_list[$i][3]; ?></td>
        <td><? echo $arr_list[$i][1]; ?></td>
        <td><? echo $arr_list[$i][2]; ?></td>
    <td><? echo $arr_list[$i][4].' '.$arr_list[$i][8]; ?></td>
    <td><? echo unit(price_descount($checkmember[0][2],$arr_list[$i][5])); ?></td>
    <td><? echo $arr_list[$i][6]; ?></td>
  </tr>

	<?	 } ?>
            
</table>
          <div id="cclear"></div></div></div></td>
    </tr>
  </table><input type="button" value="<? echo CART_ADD_TO_CART;?>" onclick="checkusername('<? echo $stock_detail[0][0];?>'),close_facebox()" /></td>
    <td width="394" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><img src="images/ttfjpg.php?t=<? echo PRODUCT_PREVIEW;?>&amp;bg=titlebg2.jpg&amp;z=18&amp;x=5&amp;y=22&amp;r=0&amp;b=0&amp;g=0"  /></td>
        </tr>
        <tr>
          <td style="color:#000; font-size:14px;"><img src="<? echo attachment($con0=1,$con1=$stock_detail[0][0],$con2='pic');  ?>" width="400" />
		  </td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
  

</body>
</html>